<template>
    <view :style="style" class="container-c row block">
        <view class="title"><slot /></view>
        <view class="title-more" @click="onMore" v-if="isMore">
            <text>更多</text>
            <image src="@/static/common/more.png" class="icon" />
        </view>
    </view>
</template>
<script setup lang="ts">
import { defineEmits } from '@vue/runtime-core'
import { goApp } from '@/utils/util'
defineExpose()
const emits = defineEmits(['more'])
const props = defineProps(['style', 'isMore'])
const onMore = () => {
    if (props.isMore === true) {
        emits('more')
    } else {
        goApp(props.isMore)
    }
}
</script>
<style lang="scss" scoped>
.title {
    font-weight: bold;
    font-size: $uni-font-size-h4;
}
.title-more {
    color: $uni-text-color-grey;
    display: flex;
    align-items: center;
}
.icon {
    width: 24rpx;
    height: 24rpx;
}
</style>
